package com.elot.service;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.elot.core.dao.GenericDao;
import com.elot.dto.LotDto;

@Service
public class LotServiceImpl implements LotService {
	
	@Autowired
	private GenericDao genericDao;

	public LotDto find(Long id) {
		return genericDao.findObject(LotDto.class, id);
	}

	public void remove(Long id) {
		genericDao.removeObject(LotDto.class, id);
	}

	public LotDto save(LotDto lot) {
		return genericDao.saveObject(lot);
	}

	public Collection<LotDto> findAll() {
		return genericDao.findAllObjects(LotDto.class);
	}

}
